package com.cat.recruit.bean.dto;

import com.cat.recruit.entity.ScoreComment;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "评分评论DTO")
@Data
public class ScoreCommentDTO {
    @Schema(description = "评分评论ID")
    private Integer scoreCommentId;

    @Schema(description = "考核ID")
    private Integer accessId;

    @Schema(description = "管理员id")
    private Integer adminId;

    @Schema(description = "管理员名称")
    private String adminName;

    @Schema(description = "评分")
    private Integer score;

    @Schema(description = "评论")
    private String comment;

    @Schema(description = "状态")
    private Integer state;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    public ScoreCommentDTO(ScoreComment scoreComment) {
        this.scoreCommentId = scoreComment.getScoreCommentId();
        this.accessId = scoreComment.getAccessId();
        this.adminId = scoreComment.getAdminId();
        this.adminName = scoreComment.getAdminName();
        this.score = scoreComment.getScore();
        this.comment = scoreComment.getComment();
        this.state = scoreComment.getState();
        this.createTime = scoreComment.getCreateTime();
        this.updateTime = scoreComment.getUpdateTime();
    }
}
